package com.fucking.great.context.handler;

import com.fucking.great.context.TxnContext;

/**
 * 抽象的装饰者
 */
public abstract class AbstractHandlerDecorator implements GreatHandler {
    private GreatHandler concreteComponenter;

    public AbstractHandlerDecorator(GreatHandler concreteComponenter) {
        this.concreteComponenter = concreteComponenter;
    }

    @Override
    public Object doService(TxnContext text) {
        return concreteComponenter.doService(text);
    }

    @Override
    public void destroy() {
        concreteComponenter.destroy();
    }
}
